//
//  ViewController.m
//  LHAppAuthorizationManager
//
//  Created by Apple on 2017/12/8.
//  Copyright © 2017年 yxkj. All rights reserved.
//

#import "ViewController.h"
#import "LHAppAuthorizationManager.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   
}

- (IBAction)clickMe:(id)sender {
//    [LHAppAuthorizationManager lh_requestUserAuthorizationPhotosWith:^(PHAuthorizationStatus status) {
//        if (status==PHAuthorizationStatusRestricted) {
//            NSLog(@"访问受限制");
//        }else if (status==PHAuthorizationStatusDenied){
//            NSLog(@"用户已拒绝");
//        }else if (status==PHAuthorizationStatusAuthorized){
//            NSLog(@"用户已授权");
//        }else if (status==PHAuthorizationStatusNotDetermined){
//            NSLog(@"用户尚未决定");
//        }
//    }];
    
//        [LHAppAuthorizationManager lh_requestUserAuthorizationCameraWith:^(AVAuthorizationStatus status) {
//            if (status==AVAuthorizationStatusRestricted) {
//                    NSLog(@"访问受限制");
//                }else if (status==AVAuthorizationStatusDenied){
//                    NSLog(@"用户已拒绝");
//                }else if (status==AVAuthorizationStatusAuthorized){
//                    NSLog(@"用户已授权");
//                }else if (status==AVAuthorizationStatusNotDetermined){
//                    NSLog(@"用户尚未决定");
//            }
//        }];
    
//    CLAuthorizationStatus status =  [LHAppAuthorizationManager lh_requestUserAuthorizationLocation];
//    if (status==kCLAuthorizationStatusRestricted) {
//        NSLog(@"访问受限制");
//    }else if (status==kCLAuthorizationStatusDenied){
//        NSLog(@"用户已拒绝");
//    }else if (status==kCLAuthorizationStatusAuthorizedAlways){
//        NSLog(@"用户允许一直使用地理位置");
//    }else if (status==kCLAuthorizationStatusAuthorizedWhenInUse){
//        NSLog(@"用户允许在使用APP的授权使用地理位置");
//    }
    
}



@end
